import java.lang.annotation.*;

/**
 * Created by chinalin on 2017/3/21.
 */
@Retention(RetentionPolicy.RUNTIME) //此注解运行到内存时才消除
@Target({ElementType.METHOD,ElementType.TYPE}) //此注解可修饰方法和类
@interface MyAnnotation {
    String color() default "blue" ;
    String name() default "ltd" ;
    String age() default "31" ;
    String value();
    int[] arrayAttr() default {1,2,3} ;
    boolean isTrue();
    EnumTest.TrafficLamp lamp();
    MetaAnnotation annotationAttr() default @MetaAnnotation(value = "chinalin",metaLamp = EnumTest.TrafficLamp.MON) ;
    Class<? extends Annotation> china() ;   //是个注解类
/*    String value();
    int[] arrayAttr() default {1};
    EnumDemo4.TrafficLamp lamp() default EnumDemo4.TrafficLamp.RED;
    AnnotationTest2.MetaAnnotation annotationAttr() default @AnnotationTest2.MetaAnnotation( "lhm");*/
    Class clazz() default String.class;
}
